home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 093 - Land of Spur.dsk / SPUR.SUB.S < prev    next >
Text File  |  2019-02-17  |  22KB  |  652 lines

  1.                          ; _  _  _  _  _  _  _  _  _
  2.                          ;[_][_][_][_][_][_][_][_][_]
  3.                          ;
  4.                          ;      The Land of SPUR
  5.                          ;
  6.                          ;      (C)opyright 1987
  7.                          ;        Greg W. Davis
  8.                          ;            and
  9.                          ;      Peripherals Plus
  10.                          ;
  11.                          ; 03/23/87             21:18 
  12.                          ;___________________________
  13.                          ;           v3.0
  14.                          ;          Spur Sub
  15.                          ;   Sub-routines  Segment
  16.                          ; _  _  _  _  _  _  _  _  _
  17.                          ;[_][_][_][_][_][_][_][_][_]
  18.  
  19.           on nocar goto dropped
  20.  
  21.           public show0
  22.           public show1
  23.           public show2
  24.           public show3
  25.           public show4
  26.           public quit
  27.           public win
  28.  
  29.           if instr("WEAR",i$) goto wear
  30.           if instr("USE",i$) goto use
  31.           if instr("EAT",i$) goto eat
  32.           if instr("DRINK",i$) goto drink
  33.           if instr("READY",i$) goto rdy.wep
  34.           if not instr("CAST",i$) goto linkgame
  35.  
  36.                          ; *****************
  37.                          ; *  CAST Spells  *
  38.                          ; *****************
  39.           
  40. cast
  41.           if xs=0 print \"No Spells.":goto linkgame
  42.           gosub prspell
  43.           input @2\"Cast which spell number? "a$:if a$="" goto linkgame
  44.           x=val(a$):if (x<1) or (x>xs) print \"You do not know that spell.":goto linkgame
  45.           y=(x*4)-3:l=len(xs$):x=val(mid$(xs$,y))
  46.           xs=xs-1:if xs=0 then xs$="":goto spl.read
  47.           if y=1 then xs$=mid$(xs$,5):goto spl.read
  48.           if (y+4)>l then xs$=left$(xs$,y-1):goto spl.read
  49.           xs$=left$(xs$,y-1)+mid$(xs$,y+4)
  50.           
  51. spl.read
  52.           dy$=dx$+"spells"
  53.           open #1,dy$
  54.           position #1,40,x
  55.           input #1,cb$\q$,q2$,q3,q4
  56.           close
  57.           
  58. cst.outc
  59.           b=20-pi:if b<3 then b=3
  60.           zz$=rnd$:a=random(b):b=0
  61.           if a<q3 then b=1:goto cast.spl
  62.           zz$=rnd$:a=random(10)
  63.           if a<5 then b=2
  64.           if (not b) goto spl.fail
  65.           
  66. cast.spl
  67.           cs=0:c1$=left$(q2$,1):c2=val(right$(q2$,1)):c2=c2/b
  68.           if c1$="S" goto cst.strn
  69.           if c1$="W" goto cst.wisd
  70.           if c1$="D" goto cst.dext
  71.           if c1$="C" goto cst.cons
  72.           if c1$="E" goto cst.engy
  73.           if c1$="I" goto cst.intl
  74.           if c1$="T" goto cst.xfer
  75.           if c1$="P" goto cst.plyr
  76.           if c1$="M" goto cst.mons
  77.           if c1$="L" goto cst.dnlv
  78.           if c1$="U" goto cst.uplv
  79.           if c1$="R" goto cst.shop
  80.           if c1$="G" goto cst.spur
  81.           if c1$="A" goto cst.aura
  82.           
  83. cst.strn
  84.           if (b=1) and (ps<20) then ps=ps+c2:goto spl.succ
  85.           if ps=>c2 then ps=ps-c2
  86.           goto spl.back
  87.           
  88. cst.wisd
  89.           if (b=1) and (pw<20) then pw=pw+c2:goto spl.succ
  90.           if pw=>c2 then pw=pw-c2
  91.           goto spl.back
  92.           
  93. cst.dext
  94.           if (b=1) and (pd<20) then pd=pd+c2:goto spl.succ
  95.           if pd=>c2 then pd=pd-c2
  96.           goto spl.back
  97.           
  98. cst.cons
  99.           if (b=1) and (pt<20) then pt=pt+c2:goto spl.succ
  100.           if pt=>c2 then pt=pt-c2
  101.           goto spl.back
  102.           
  103. cst.engy
  104.           if (b=1) and (pe<20) then pe=pe+c2:goto spl.succ
  105.           if pe=>c2 then pe=pe-c2
  106.           goto spl.back
  107.           
  108. cst.intl
  109.           if (b=1) and (pi<20) then pi=pi+c2:goto spl.succ
  110.           if pi=>c2 then pi=pi-c2
  111.           goto spl.back
  112.           
  113. cst.xfer
  114.           if b=1 print \'
  115. Your      gold has been transferred to
  116. your      bank account.':bh=bh+gh:bl=bl+gl:gh=0:gl=0:goto cst.x2
  117.           print \'
  118. Spell     has backfired.  You are now
  119. carrying  all your gold.':gh=gh+bh:gl=gl+bl:bh=0:bl=0
  120.           
  121. cst.x2
  122.           if bl=>10000 then bl=bl-10000:bh=bh+1
  123.           if gl=>10000 then gl=gl-10000:gh=gh+1
  124.           goto linkgame
  125.           
  126. cst.plyr
  127.           if b=2 goto cst.pl2
  128.           zz$=rnd$:a=random(10)
  129.           if a=10 goto win
  130.           if hp<24 then hp=hp+c2:goto spl.succ
  131. cst.pl2
  132.           if hp>c2 then hp=hp-c2
  133.           goto spl.back
  134.           
  135. cst.mons
  136.           if b=2 goto cst.mns2
  137.           zz$=rnd$:a=random(10)
  138.           if a>5 then mw=0:mf=0:md=1:mk=mk+1:goto spl.succ
  139.           ms=ms-c2:if ms<=0 then ms=0:mw=0:mf=0:md=1:mk=mk+1
  140.           if mw print \m$" appears to have weakened."
  141.           goto spl.succ
  142. cst.mns2
  143.           ms=ms+c2:print \'
  144. The       spell appears to have made ':print m$" stronger!"
  145.           goto spl.back
  146.           
  147. cst.dnlv
  148.           if b=2 goto cst.dn2
  149.           if lc>cl then cl=cl+1:cs=1:goto spl.succ
  150.           goto spl.fail
  151. cst.dn2
  152.           if cl<>1 then cl=cl-1:cs=1:goto spl.back
  153.           goto spl.fail
  154.           
  155. cst.uplv
  156.           if b=2 goto cst.up2
  157.           if cl<>1 then cl=cl-1:cs=1:goto spl.succ
  158.           goto spl.fail
  159. cst.up2
  160.           if lc>cl then cl=cl+1:cs=1:goto spl.back
  161.           goto spl.fail
  162.           
  163. cst.shop
  164.           if b=2 goto cst.shp2
  165.           cr=1:di=6:cs=1:goto spl.succ
  166. cst.shp2
  167.           zz$=rnd$:cr=random(nr):if cr=0 goto cst.shp2
  168.           cs=1:goto spl.back
  169.           
  170. cst.spur
  171.           if cl<>sl print \"SPUR is not on level "cl"!":goto spl.fail
  172.           cr=sr:cs=1:print \"Prepare thyself...":goto spl.succ
  173.           
  174. cst.aura
  175.           x=q4/10:if tm=0 then tm=mm+x+c2:else tm=tm+x+c2
  176.           goto spl.succ
  177.           
  178. spl.succ
  179.           print \"Spell successful!"
  180.           
  181. spl.link
  182.           if cs then dy$=dz$+"spur.main":link dy$,"travel3"
  183.           goto linkgame
  184.           
  185. spl.back
  186.           print \"Spell Backfired!"
  187.           goto spl.link
  188.           
  189. spl.fail
  190.           print \"Spell failed..."
  191.           goto spl.link
  192.           
  193.  
  194.                          ; *******************
  195.                          ; *  READY Weapons  *
  196.                          ; *******************
  197.  
  198. rdy.wep
  199.           if ps<4 print \'
  200. Not       enough strength to ready a weapon!':goto linkgame
  201.           gosub pr.weapons:if xw=0 goto linkgame
  202. rdy.wep2
  203.           input @2\"Ready which Weapon number? "a$:if a$="" goto linkgame
  204.           x=val(a$):if (x<1) or (x>xw) print \"You don't have that Weapon!":goto rdy.wep2
  205.           y=(x*4)-3:a=val(mid$(xw$,y))
  206.           open #1,dy$:position #1,34,a,2
  207.           input #1,ws$\ws,wd\wa
  208.           close
  209.           if (ws<5) and (pd<6) print'
  210. Not       dextrous enough to ready this weapon!':goto linkgame
  211.           wr$=mid$(ws$,3) 
  212.           if xp>1 then ws=((xp+2)*ws)/3
  213.           print \"Weapon readied":goto linkgame
  214.  
  215.                          ; **********
  216.                          ; *  WEAR  *
  217.                          ; **********
  218.           
  219. wear
  220.           gosub pr.items:if xi=0 goto linkgame
  221. wear2
  222.           input @2\"Wear which number Item? "a$:if a$="" goto linkgame
  223.           x=val(a$):if (x<1) or (x>xi) print \"You don't have that item.":goto wear2
  224.           y=(x*4)-3:x=val(mid$(xi$,y))
  225.           open #1,dy$:position #1,30,x,2
  226.           input #1,n$\it:close
  227.           if left$(n$,1) <> "A" print \"This is not an Armor!":goto linkgame
  228.           if ar<100 then it=it*10:ar=ar+it:ra=1:if ar>100 then ar=100
  229.           ep=ep+1:if pi<8 then pi=pi+1
  230.           print \mid$(n$,3)" worn.":gosub clr.item:goto linkgame
  231.  
  232.                          ; *********
  233.                          ; *  USE  *
  234.                          ; *********
  235.           
  236. use
  237.           gosub pr.items:if xi=0:goto linkgame
  238. use2
  239.           input @2\"Use which number Item? "a$:if a$="" goto linkgame
  240.           x=val(a$):if (x<1) or (x>xi) print \"You don't have that item.":goto use2
  241.           y=(x*4)-3:x=val(mid$(xi$,y))
  242.           open #1,dy$:position #1,30,x,2
  243.           input #1,n$\it:close
  244.           if left$(n$,1)="P" goto use3
  245.           if (left$(n$,1) <> "S") print \"This is not a Usable Item!":goto linkgame
  246.           ep=ep+1:if pi<8 then pi=pi+1
  247.           if sh<100 then it=it*10:sh=sh+it:hs=1:if sh>100 then sh=100
  248.           print \mid$(n$,3)" used.":gosub clr.item:goto linkgame
  249. use3
  250.           ep=ep+1
  251.           if cp=0 cp=1:print \"Compass used.":else cp=0:print \"Compass placed in pack."
  252.           goto linkgame
  253.  
  254.                          ; *********
  255.                          ; *  EAT  *
  256.                          ; *********
  257.           
  258. eat
  259.           gosub pr.food:if xf=0 goto linkgame
  260. eat2
  261.           input @2\"Eat which number Item? "a$:if a$="" goto linkgame
  262.           x=val(a$):if (x<1) or (x>xf) print \"You don't have that item.":goto eat2
  263.           y=(x*4)-3:x=val(mid$(xf$,y))
  264.           open #1,dy$:position #1,26,x,2
  265.           input #1,gs$\gs:close
  266.           if left$(gs$,1)<>"F" print \mid$(gs$,3)" cannot be eaten.":goto linkgame
  267.           a=random(gs):a=a mod 8:if ps<18 then ps=ps+a
  268.           if hp<25 then hp=hp+a
  269.           
  270.           if ps<15 print \"Your hunger lessens."
  271.           if ps>14 print \"Your appetite is satisfied.":if (pe>15) and (pt<18) then pt=pt+1
  272.           ep=ep+1
  273.           gosub clr.food:goto linkgame
  274.  
  275.                          ; ***********
  276.                          ; *  DRINK  *
  277.                          ; ***********
  278.           
  279. drink
  280.           gosub pr.food:if xf=0 goto linkgame
  281. drink2
  282.           input @2\"Drink which number Item? "a$:if a$="" goto linkgame
  283.           x=val(a$):if (x<1) or (x>xf) print \"You don't have that item.":goto drink2
  284.           y=(x*4)-3:x=val(mid$(xf$,y))
  285.           open #1,dy$:position #1,26,x,2
  286.           input #1,gs$\gs:close
  287.           if left$(gs$,1)<>"D" print \mid$(gs$,3)" cannot be drunk.":goto linkgame
  288.           a=random(gs):a=a mod 6:if pe<18 then pe=pe+a+1
  289.           if hp<25 then hp=hp+a
  290.           print \"You feel refreshed."
  291.           if pe>14 print \"...hiccup..."
  292.           ep=ep+1:if (pe>15) and (ps>15) and (pt<18) then pt=pt+1
  293.           gosub clr.food:goto linkgame
  294.  
  295.                          ; ***********************
  296.                          ; *  Clear Subroutines  *
  297.                          ; ***********************
  298.           
  299. clr.item
  300.           xi=xi-1:if xi=0 then xi$="":return
  301.           l=len(xi$)
  302.           if y=1 then xi$=mid$(xi$,5):return
  303.           if (y+4)>l then xi$=left$(xi$,y-1):return
  304.           xi$=left$(xi$,y-1)+mid$(xi$,y+4)
  305.           return
  306.           
  307. clr.food
  308.           xf=xf-1:if xf=0 then xf$="":return
  309.           l=len(xf$)
  310.           if y=1 then xf$=mid$(xf$,5):return
  311.           if (y+4)>l then xf$=left$(xf$,y-1):return
  312.           xf$=left$(xf$,y-1)+mid$(xf$,y+4)
  313.           return
  314.           
  315.                          ; *****************************
  316.                          ; *  Display Stats/Inventory  *
  317.                          ; *****************************
  318.           
  319. show0
  320.           on nocar goto dropped
  321.           gosub invent
  322.           goto linkgame
  323.  
  324. show1
  325.           on nocar goto dropped
  326.           gosub status
  327.           goto linkgame
  328.  
  329. show2
  330.           on nocar goto dropped
  331.           gosub status
  332.           goto lnkmain1
  333.  
  334. show3
  335.           on nocar goto dropped
  336.           gosub invent
  337.           goto lnkmain1
  338.  
  339. show4
  340.           on nocar goto dropped
  341.           gosub status
  342.           goto lnk.duel
  343.           
  344.                          ; *******************
  345.                          ; *  Player Status  *
  346.                          ; *******************
  347.           
  348. status
  349.           print \n1$"'s Current Status:"\
  350.           g1=gh:g2=gl:gosub prt.gold
  351.           print "Gold - In Hand:"gd$
  352.           g1=bh:g2=bl:gosub prt.gold
  353.           print "       In Bank:"gd$
  354.           print \"Experience Pts :"right$("   "+str$(ep),3)"   Hit Points   :"right$("   "+str$(hp),3)
  355.           print "Monsters Kills :"right$("   "+str$(mk),3)"   Player Level :"right$("   "+str$(xp),3)
  356.           a=ps*4:print \"Strength: "right$("  "+str$(ps),2)right$("    "+str$(a),4)"%   ";
  357.           a=pt*4:print "Const'n  :"right$("  "+str$(pt),2)right$("    "+str$(a),4)"%"
  358.           a=pi*4:print "Intel   : "right$("  "+str$(pi),2)right$("    "+str$(a),4)"%   ";
  359.           a=pd*4:print "Dexterity:"right$("  "+str$(pd),2)right$("    "+str$(a),4)"%"
  360.           a=pw*4:print "Wisdom  : "right$("  "+str$(pw),2)right$("    "+str$(a),4)"%   ";
  361.           a=pe*4:print "Energy   :"right$("  "+str$(pe),2)right$("    "+str$(a),4)"%"
  362.           print \"Shield  :    "right$("  "+str$(sh),3)"%   ";
  363.           print "Armor    :   "right$("  "+str$(ar),3)"%"
  364.           print \"Class   : ";
  365.           if pc=1 print "Alchemist ";:else if pc=2 print "Druid     ";
  366.           if pc=3 print "Fighter   ";:else if pc=4 print "Paladin   ";
  367.           if pc=5 print "Ranger    ";:else if pc=6 print "Thief     ";
  368.           if pc=7 print "Archer    ";:else if pc=8 print "Assassin  ";
  369.           if pc=9 print "Knight    ";
  370.           print "     Race: ";
  371.           if pr=1 print "Human":else if pr=2 print"Ogre"
  372.           if pr=3 print "Gnome":else if pr=4 print"Elf"
  373.           if pr=5 print "Hobbit":else if pr=6 print"Hafling"
  374.           if pr=7 print "Dwarf":else if pr=8 print"Orc"
  375.           if pr=9 print "Half-Elf"
  376.           print \"SPUR : ";:if (sr) print "Alive!":else print "Dead..."
  377.           g1=dh:g2=dl:gosub prt.gold
  378.           print "Dwarf: ";:if (df) print "Alive!  ["gd$" gold]":else print "Dead..."
  379.           ex=clock(1)-ew:print \"Hourglass: "((ev-ex)/60)" mins."
  380.           goto stat.rtn
  381.           
  382.                          ; **********************
  383.                          ; *  Player Inventory  *
  384.                          ; **********************
  385.           
  386. invent
  387.           g1=gh:g2=gl:gosub prt.gold
  388.           print \"Gold - In Hand:"gd$
  389.           print \"Items Carried:"
  390.           gosub pr.items
  391.           print \"Rations:"
  392.           gosub pr.food
  393.           print \"Weapons:"
  394.           gosub pr.weapons
  395.           print \"Spells Known:"
  396.           gosub prspell
  397.           
  398. stat.rtn
  399.           on nocar goto drop.1
  400.           print \"Allies:"\
  401.           d$=d1$:d=a1:gosub prally:d$=d2$:d=a2:gosub prally:d$=d3$:d=a3:gosub prally
  402.           print "Press [RETURN] ";
  403. get.key
  404.           a=key(0):if a=0 goto get.key
  405.           print chr$(8,16);chr$(32,16);chr$(8,16)
  406.           return
  407.  
  408.                          ; *************************
  409.                          ; *  Display Subroutines  *
  410.                          ; *************************
  411.           
  412. prspell
  413.           if xs=0 print \"No Spells.":return
  414.           dy$=dx$+"spells"
  415.           open #1,dy$
  416.           print:for x=1 to xs
  417.           y=(x*4)-3:a=val(mid$(xs$,y))
  418.           position #1,40,a
  419.           input #1,cb$\q$,q2$,q3,q4
  420.           print right$("   "+str$(x),3)". - ";
  421.           print q$       ;chr$(32,21-len(q$))"   Success: "q3"0%"
  422.           next:close:return
  423.  
  424. prally
  425.           if d$="*" return
  426.           print d$       ;chr$(32,18-len(d$))" Strength: "d
  427.           return
  428.  
  429. pr.items
  430.           if xi=0 print \"No Items.":return
  431.           dy$=dx$+"items"
  432.           open #1,dy$
  433.           print:for x=1 to xi
  434.           y=(x*4)-3:a=val(mid$(xi$,y))
  435.           position #1,30,a,2
  436.           input #1,n$
  437.           print right$("   "+str$(x),3)". - "mid$(n$,3)
  438.           next:close:return
  439.  
  440. pr.food
  441.           if xf=0 print \"No Rations.":return
  442.           dy$=dx$+"stores"
  443.           open #1,dy$
  444.           print:for x=1 to xf
  445.           y=(x*4)-3:a=val(mid$(xf$,y))
  446.           position #1,26,a,2
  447.           input #1,n$
  448.           print right$("   "+str$(x),3)". - "mid$(n$,3)
  449.           next:close:return
  450.  
  451. pr.weapons
  452.           if xw=0 print \"No Weapons.":return
  453.           dy$=dx$+"weapons"
  454.           open #1,dy$
  455.           print:for x=1 to xw
  456.           y=(x*4)-3:a=val(mid$(xw$,y))
  457.           position #1,34,a,2
  458.           input #1,n$
  459.           print right$("   "+str$(x),3)". - "mid$(n$,3)
  460.           next:close:return
  461.           
  462.                          ; ***********************
  463.                          ; *  Sound Subroutines  *
  464.                          ; ***********************
  465.           
  466. tune
  467.           pl$="100,109,100,109,134,162,120,162,134,100,90,81,67,81,120,107,120"
  468.           du$="160,40,40,80,120,120,80,240,120,160,40,40,80,80,40,40,200"
  469. tune.1
  470.           p=val(pl$):du=val(du$)
  471.           tone(p,du)
  472.           a=instr(",",pl$):if a=0 return
  473.           pl$=mid$(pl$,a+1)
  474.           a=instr(",",du$):if a=0 return
  475.           du$=mid$(du$,a+1)
  476.           goto tune.1
  477.           
  478.                          ; **********************
  479.                          ; *  GOLD Subroutines  *
  480.                          ; **********************
  481.           
  482. prt.gold
  483.           a$=str$(g1):gd$="0000":if g1=0 then gd$="    ":a$=" "
  484.           gd$=right$("    "+a$,5)+right$(gd$+str$(g2),4)
  485.           return
  486.  
  487. add.gold
  488.           gl=gl+g2:if gl=>10000 then gl=gl-10000:gh=gh+1
  489.           return
  490.           
  491. tot.gold
  492.           g1=gh+bh:g2=gl+bl:if g2=>10000 then g2=g2-10000:g1=g1+1
  493.           return
  494.           
  495.                          ; ***********************
  496.                          ; *  Award Gold/Allies  *
  497.                          ; ***********************
  498.           
  499. quit
  500.           on nocar goto dropped
  501.           print \n1$"'s Current Status:"
  502.           print \"Experience Points: "ep
  503.           print "Monsters Killed:   "mk
  504.           zz$=rnd$:a=random(ep):a=a/3:if a>0 print \"SPUR awards you "a" gold"\"for your experience.":g2=a:gosub add.gold
  505.  
  506. ally
  507.           zz$=rnd$:a=random(10)
  508.           if (a>8) or (a<2) goto ally2
  509.           goto ally4
  510. ally2
  511.           x=0
  512.           print \"Seeking new allies.."
  513.           dy$=dx$+"allies"
  514.           open #1,dy$
  515.           zz$=rnd$:a=random(ac)
  516.           if a=0 goto ally3
  517.           position #1,26,a
  518.           input #1,cb$\x1$\x1,x2:if cb$<>"1" goto ally3
  519.           x1=(x1+x2)/2:x1=random(x1)+5:x2=a
  520.           if a1=0 then d1$=x1$:a1=x1:h1=x2:x=1:goto ally3
  521.           if a2=0 then d2$=x1$:a2=x1:h2=x2:x=2:goto ally3
  522.           if a3=0 then d3$=x1$:a3=x1:h3=x2:x=3:goto ally3
  523. ally3
  524.           if x=0 print \"No alliance made.":goto ally4
  525.           print \"You have a new ally!"\\"#"x" Name: "x1$" Strength: "x1
  526.           position #1,26,a:print #1,0
  527. ally4
  528.           close
  529.           dy$=dz$+"spur.logon"
  530.           link dy$,"quit1"
  531.  
  532.                          ; **********************
  533.                          ; *  Check for Winner  *
  534.                          ; **********************
  535.           
  536. win
  537.           on nocar goto dropped
  538.           if (sr) print \'A voice echoes...
  539. "Thou     may not leave MY land until
  540. I         am defeated!"':goto linkgame
  541.           
  542.           if go=1 goto win2
  543. win1
  544.           if xi=0 goto nowin
  545.           for x=1 to xi
  546.           y=(x*4)-3:a=val(mid$(xi$,y))
  547.           if a=og then x=xi:print \"Ye have found the Object I have sought!"
  548.           next
  549.           if (a=og) and (go=3) goto win2
  550.           if a=og goto win4:else goto nowin
  551. win2
  552.           gosub tot.gold:gosub chk.obj:if a print \"Ye have found Riches enough to pass through":else goto nowin
  553. win4
  554.           if sd=1 gosub tune
  555.           a=0:wn=1:print \"Hold! SPUR will value what you have found.."
  556.           dy$=dx$+"items"
  557.           open #1,dy$
  558.           if xi=0 close:goto win5
  559.           for x=1 to xi
  560.           y=(x*4)-3
  561.           b=val(mid$(xi$,y))
  562.           position #1,30,b
  563.           input #1,cb$\n$\it:if left$(n$,1)="T" then a=(it*5)+a
  564.           next:close
  565.           x=0:xi$=""
  566.  
  567. win5
  568.           if a1 gosub win4a:a=a+x
  569.           if a2 gosub win4a:a=a+x
  570.           if a3 gosub win4a:a=a+x
  571.           print \\"SPUR awards you "a" gold for your goods."
  572.           g1=a:gosub add.gold
  573.           print \"Prepare for NEW Adventure..."
  574.           i$="":dw$=dx$+"spur.items":open #1,dw$
  575.           position #1,84,pn:print #1,0\i$:close
  576.           dy$=dx$+"spur.allies"
  577.           open #1,dy$:position #1,78,pn
  578.           for i=1 to 3
  579.           print #1,"*",0,0
  580.           next:close
  581.           if d1$<>"*" then x=h1:gosub fre.ally
  582.           if d2$<>"*" then x=h2:gosub fre.ally
  583.           if d3$<>"*" then x=h3:gosub fre.ally
  584.           d1$="*":d2$="*":d3$="*":a1=0:a2=0:a3=0:h1=0:h2=0:h3=0
  585.           print \"Adding name to CONQUEROR'S list..."
  586.           dy$=dx$+"spur.winners":open #1,dy$:append #1
  587.           print #1,\"Adventurer     : "n1$
  588.           print #1,"Quest Completed: "date$" "time$
  589.           print #1,"Character Level: "xp
  590.           print #1,"Experience Pts : "ep
  591.           print #1,"Number of Moves: "mm
  592.           print #1,"Monster Kills  : "mk
  593.           gosub tot.gold:gosub prt.gold
  594.           print #1,"Gold Acquired  : "gd$\md$
  595.           close
  596.           goto linkmain
  597.  
  598. win4a
  599.           zz$=rnd$:x=random(100)
  600.           return
  601.  
  602. nowin
  603.           print\'
  604. An        invisible barrier holds you back! A
  605. voice     comes from the gloom and says:
  606.  
  607. "You      have not found the key to SPUR!
  608.           You may NOT pass through!"'
  609.           goto linkgame
  610.  
  611. fre.ally
  612.           dy$=dx$+"allies":open #1,dy$
  613.           position #1,26,x
  614.           print #1,1:close:return
  615.  
  616.                          ; ********************************
  617.                          ; *  Check Gold Required Amount  *
  618.                          ; ********************************
  619.           
  620. chk.obj
  621.           a=0
  622.           g1=gh+bh:g2=gl+bl:if g2=>10000 then g2=g2-10000:g1=g1+1
  623.           if g1>oh then a=1:return
  624.           if (g1=oh) and (g2=>ol) then a=1
  625.           return
  626.           
  627.                          ; ****************************
  628.                          ; *  Relink to Main Program  *
  629.                          ; ****************************
  630.           
  631. linkmain
  632.           dy$=dz$+"spur.shop"
  633.           link dy$,"main"
  634.           
  635. lnkmain1
  636.           dy$=dz$+"spur.logon"
  637.           link dy$,"main1"
  638.           
  639. linkgame
  640.           dy$=dz$+"spur.main"
  641.           link dy$
  642.           
  643. lnk.duel
  644.           dy$=dz$+"spur.duel"
  645.           link dy$,"duel"
  646.           
  647. drop.1
  648.           pop
  649. dropped
  650.           dy$=dz$+"spur.logon"
  651.           link dy$,"quit3"
  652.